package com.ljt.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ljt.system.entity.Menu;
import com.ljt.system.entity.Role;
import com.ljt.system.entity.User;
import com.ljt.system.mapper.MenuMapper;
import com.ljt.system.mapper.RoleMapper;
import com.ljt.system.mapper.UserMapper;
import com.ljt.system.mapper.UserVoMapper;
import com.ljt.system.service.UserService;
import com.ljt.system.service.UserVoService;
import com.ljt.system.vo.UserVo;
import com.ljt.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author ljt
 * @since 2021-06-27
 */
@Service
public class UserVoServiceImpl extends ServiceImpl<UserVoMapper, UserVo> implements UserVoService {


    @Autowired
    private UserVoMapper userVoMapper;

//    @Override
//    public Page<UserVo> queryUserByPage(Page userPage) {
//        return userVoMapper.queryUserByPage(userPage);
//    }

    @Override
    public Page<UserVo> queryUserByName(Page userPage, @RequestParam Integer departmentId, @RequestParam String username) {
        return userVoMapper.queryUserByUserName(userPage,departmentId,username);
    }

}
